<template>
  <el-tree :data="data1" :props="defaultProps" @node-click="handleNodeClick" />
</template>

<script>
// import axios from '../components/http/axios'
import axios from 'axios'
export default {
  name:'group_manage',
  data() {
    return {
      data1:[],
  
      defaultProps: {
        children: 'children',
        label: 'label',
      },
    }
  },
  methods: {
    handleNodeClick(data1) {
      this.$emit('pid',data1.pid)
      console.log(data1)
      // alert(data1)
    },
    getshu(){
      axios({url:'zuzhi',method:'get'}).then(res=>{
        this.data1 = res.data.list

        console.log(this.data1);
      })
    }
  },
  mounted(){
    this.getshu()
  }
}
</script>
<style scoped>

</style>